SOURCE = $(wildcard *.o)
ADDED = -ldl -lslog -g
MAIN = juzLog.so
MVSOPATH = ../../build/plugin/
RUNPATH = ../../build/
LOGPATH = ../../build/log/

define cmd_finshyes
if [  -d $(MVSOPATH) ]; then \
    cp *.so $(MVSOPATH); \
    cp ../logConfig $(RUNPATH); \
fi

if [ ! -d $(LOGPATH) ]; then \
   	mkdir $(LOGPATH); \
fi


endef
 
$(MAIN):$(SOURCE)
	g++ -shared -o $(MAIN) $(SOURCE) $(ADDED)
	$(cmd_finshyes)
	@echo 程序合成成功！